@import './pub.less';

.flex-box {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    .flex-item {
        flex: 1;
    }
}

/* 文本溢出 */
.ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ellipsis2 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ellipsis3:extend(.ellipsis2) {
    -webkit-line-clamp: 3;
}


/* scroll */

.nui-scroll {
    overflow: auto;
}

.nui-scroll::-webkit-scrollbar {
    width: 10px;
    height: 8px;
}
/*正常情况下滑块的样式*/

.nui-scroll::-webkit-scrollbar-thumb {
    background-color: @c14;
    border-radius: 10px;
    box-shadow: inset 1px 1px 0 @c14;
    -webkit-box-shadow: inset 1px 1px 0 @c14;
}
/*鼠标悬浮在该类指向的控件上时滑块的样式*/

.nui-scroll:hover::-webkit-scrollbar-thumb {
    background-color: @c14;
    border-radius: 10px;
    box-shadow: inset 1px 1px 0 @c14;
    -webkit-box-shadow: inset 1px 1px 0 @c14;
}
/*鼠标悬浮在滑块上时滑块的样式*/

.nui-scroll::-webkit-scrollbar-thumb:hover {
    background-color: @c14;
    box-shadow: inset 1px 1px 0 @c14;
    -webkit-box-shadow: inset 1px 1px 0 @c14;
}
/*正常时候的主干部分*/

.nui-scroll::-webkit-scrollbar-track {
    border-radius: 10px;
    box-shadow: inset 0 0 6px @c17;
    -webkit-box-shadow: inset 0 0 6px @c17;
    background-color: @c17;
}
/*鼠标悬浮在滚动条上的主干部分*/

.nui-scroll::-webkit-scrollbar-track:hover {
    box-shadow: inset 0 0 6px @c17;
    -webkit-box-shadow: inset 0 0 6px @c17;
    background-color: @c17;
}



body {
    font-family: "comic sans ms", '幼圆';
}

header, footer {
    width: 100%;
    height: 60px;
    line-height: 60px;
    position: fixed;
    z-index: 100;
    background: #1E9FFF;
}
footer {
    bottom: 0;
}
header {
    .head {
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        .title {
            font-size: 1.5rem;
            color: #fff;
            letter-spacing: 2px;
        }
        .setup {
            flex: 1;
            text-align: right;
            i {
                color: #fff;
                font-weight: bold;
                cursor: pointer;
                opacity: .7;
                transition: .4s;
                font-size: 20px;
                margin-right: 10px;
                &.exit {
                    margin-right: 0;
                }
                &:hover {
                    opacity: 1;
                }
            }
        }
    }
}

.main {
    padding: 70px 0 90px;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    .item {
        width: 260px;
        height: 320px;
        /* background: #1E9FFF; */
        margin: 20px 10px 5px;
        border-radius: 6px;
        position: relative;
        .item-box, .item-box-edit {
            background: #F7F7F7;
            width: calc(~"100% - 30px");
            height: calc(~"100% - 30px");
            padding: 15px;
            position: absolute;
            top: 0;
            left: 0;
            margin-top: 0;
            transition: .4s;
            border-radius: 6px;
            z-index: 10;
        }
        .item-box {
            color: #333;
            .app-name-box {
                .app-name {
                    font-size: 1.2rem;
                    font-weight: bold;
                    transition: .4s;
                    cursor: pointer;
                    &:hover {
                        color: #01AAED;
                    }
                }
                .app-pwd {
                    color: #000;
                    font-weight: bold;
                    cursor: pointer;
                    &:hover {
                        color: #5FB878;
                    }
                }
            }
            .app-logo {
                margin-top: 10px;
                height: 140px;
                text-align: center;
                overflow: hidden;
                img {
                    height: 100%;
                    cursor: pointer;
                    border-radius: 50%;
                    opacity: .8;
                    transition: .4s;
                }
            }
            .app-desc {
                margin-top: 10px;
                height: 40px;
                line-height: 20px;
                color: #777;
            }
            .app-remark {
                margin-top: 5px;
                height: 40px;
                line-height: 20px;
                font-style: italic;
                color: #777;
            }
            .app-uptime {
                margin-top: 5px;
                height: 20px;
                line-height: 20px;
                text-align: right;
                color: #999;
                font-size: 12px;
            }
            &:hover {
                /* margin-top: -15px; */
                box-shadow: 0 0 20px #1E9FFF;
                img {
                    opacity: 1;
                }
            }
        }
        .item-box-edit {
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 20;
            background: rgba(0, 0, 0, .6);
            display: none;
            i {
                font-size: 3rem;
                color: #fff;
                cursor: pointer;
                margin: auto 10px;
                transition: .4s;
                opacity: .8;
                &.i-edit {
                    text-shadow: 0 0 10px #01AAED;
                    &:hover {
                        opacity: 1;
                        color: #01AAED;
                        text-shadow: 0 0 15px #01AAED;
                    }
                }
                &.i-del {
                    text-shadow: 0 0 10px #FF5722;
                    &:hover {
                        opacity: 1;
                        color: #FF5722;
                        text-shadow: 0 0 15px #FF5722;
                    }
                    
                }
            }
        }
    }
}



/* add.html */
.add_app_box, .pwd-box, .pwd-show-box {
    padding: 20px;
    width: 440px;
    .layui-form-label {
        width: 35px;
    }
    .layui-input-block {
        margin-left: 75px;
    }
}

/* pwd.html */
.pwd-box {
    width: 440px;
    min-height: 260px;
    .pwd-title-box {
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 2px solid #1E9FFF;
        .pwd-title {
            font-weight: bold;
            line-height: 30px;
        }
        .pwd-add-box {
            i {
                vertical-align: middle;
            }
        }
    }
    .pwd-item {
        height: 40px;
        line-height: 40px;
        text-align: center;
        .seq {
            width: 60px;
        }
        .name {
            width: 100px;
        }
        .setup {
            width: 100px;
        }
        &.pwd-item-head {
            font-weight: bold;
            border-bottom: 1px #777 solid;
        }
    }

    .empty {
        text-align: center;
        margin: 20px auto;
        img {
            width: 120px;
        }
    }
}

.pwd-show-box {
    width: auto;
    max-width: 440px;
    // 查看
    .show-item {
        padding: 0 10px;
        line-height: 40px;
        .show_pwd_text {
            cursor: pointer;
        }
        .key {
            width: 120px;
            color: #777;
        }
        .val {
            &.remark {
                padding: 5px 0;
                line-height: 30px;
            }
        }
        &:nth-child(2n) {
            background: #f5f5f5;
        }
    }
}



@media screen and (max-width: 1200px) {
    .main {
        justify-content: center;
    }
}

@media screen and (max-width: 440px) {
    .add_app_box, .pwd-box, .pwd-show-box {
        width: auto;
    }
}